import { SYNCHRO_STATUS, ISSTART } from './enum';

const formItemLayout = {
  labelCol: { span: 8 }, // 左侧 label 宽度
  wrapperCol: { span: 16 }, // 右侧 控件 宽度
  style: {
    marginBottom: 24,
  },
};

// 一行显示个数
const ColConfig = {
  xs: 24, // <576
  sm: 24, // >= 576
  md: 24, // >= 768
  lg: 12, // >= 992
  xl: 8, // >= 1200
  xxl: 6, // >= 1600
};

export const tableRadioCondition = [
  {
    title: '所有商品',
    number: 0,
    value: '',
    unit: '条',
    key: 'totalNum',
  },
];

export const filterCondition = [
  {
    inputType: 'select',
    title: 'status',
    label: '组织类型',
    isAll: true,
    itemConfig: {
      initialValue: '',
    },
    componentsConfig: {
      placeholder: '请选择',
      allowClear: false,
    },
    selectCondition: SYNCHRO_STATUS,
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'select',
    title: 'status2',
    label: '启用状态',
    isAll: true,
    itemConfig: {
      initialValue: '',
    },
    componentsConfig: {
      placeholder: '请选择',
      allowClear: false,
    },
    selectCondition: ISSTART,
    formItemLayout,
    ColConfig,
  },
  {
    inputType: 'input',
    title: 'name',
    label: '商品名称',
    componentsConfig: {
      placeholder: '请输入商品名称',
      maxLength: 30,
    },
    formItemLayout,
    ColConfig,
  },
];
